 <ion-modal-view>
  <ion-header-bar class="bar bar-royal">
    <h1 class="title">增加仓库</h1>
    <div class="buttons">
      <button class="button button-icon ion-ios-close-empty" ng-click="modal.hide();"></button>
    </div>
    </ion-header-bar>
    <ion-content>
      <ion-list class="wrap-light2">
  
         <label class="item item-select">
          <span class="input-label">仓库类型</span>
          <select ng-model="newWarehouse.type" ng-change="newWarehouse.name=newWarehouse.type">
            <option value="总仓">总仓</option>
            <option value="门店仓">门店仓</option>
            <option value="柜组">柜组</option>
          </select>
        </label>

        <label class="item item-select" ng-if="newWarehouse.type=='门店仓' || newWarehouse.type=='柜组'">
          <span class="input-label">所属门店</span>
          <select ng-model="newWarehouse.parent_id">
            <option ng-repeat="store in departments" value="{{store.name}}">{{store.name}}</option>
          </select>
        </label>
        <label class="item item-input">
          <span class="input-label">仓库名称</span>
          <input type="text" name="name" maxlength="20" required ng-model="newWarehouse.name">
        </label>

        <label class="item item-input">
          <span class="input-label">仓管1</span>
          <input type="text" name="keeper1" maxlength="20" required ng-model="newWarehouse.keepers">
        </label>
        
        <label class="item item-input">
          <span class="input-label">仓管2</span>
          <input type="text" name="keeper2" maxlength="20" ng-model="newWarehouse.keeper">
        </label>
        
        <label class="item item-input">
          <span class="input-label">仓管3</span>
          <input type="text" name="keeper3" maxlength="20" ng-model="newWarehouse.keeper">
        </label>
        <button class="button button-block button-royal" ng-click="add()">确认添加</button>
      </ion-list>
    </ion-content>
</ion-modal-view>